package com.yehui.first;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor;
import org.springframework.stereotype.Service;

@Service
public class BDefinitionRegistryPostProcessor implements BeanDefinitionRegistryPostProcessor {

    //父类的
    @Override
    public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
        System.out.println("BDefinitionRegistryPostProcessor-postProcessBeanFactory");
    }

    //子类的    先执行之类的，在执行父类的
    @Override
    public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {
        System.out.println("BDefinitionRegistryPostProcessor-postProcessBeanDefinitionRegistry");
    }
}
